#pragma once

#include "vrdatacore_global.h"
#include "drawableactor.h"
#include <osg\ShapeDrawable>
#include <osg/PositionAttitudeTransform>

namespace VrDataCore
{
	class VRDATACORE_EXPORT LinkPointActor:public DrawableActor
	{
	public:
		LinkPointActor(void);
	protected:
		virtual ~LinkPointActor(void);
		virtual void createDrawable();
		virtual void initialNode();
		void initStateValue();
		QString											_oldId;
		osg::ref_ptr<osg::Box>							_pBox;
		osg::ref_ptr<osg::ShapeDrawable>				_shapeDrawable;
		osg::ref_ptr<osg::Geode>						_geode;
		osg::ref_ptr<osg::PositionAttitudeTransform>	_transformNode;
		osg::Vec3										_size;
		int												_state;
	public:
		virtual void buildPropertyMap();
		void setSourceId(const QString& mid);
		QString getSourceId() const;
		virtual osg::ref_ptr<CoreBase::ActorBase> clone();

		void setLinkPointState(int state);
		int getLinkPointState();
		void setSize(osg::Vec3 size);
		osg::Vec3 getSize();
	};
}